package com.weibo.common;

import java.util.Map;

import javax.servlet.http.Cookie;

import com.opensymphony.xwork2.ActionContext;

/**
 * 关于session的一些操作
 * @author vorce
 *
 */
public class SessionManager {

	private static Map<String,Object> session = ActionContext.getContext().getSession();
	
	public static void setSessionAttribute(String key,Object value){
		session.put(key, value);
	}
	
	public static Object getAttribute(String key){
		return session.get(key);
	}
	
	public static void remove(String key){
		session.remove(key);
	}
	
	public static void removeAll(){
		session.clear();
	}
}
